<?php switch($field->getPrintableType()):
    case shField::TEXT: ?>

    <input type="text" <?php switch ( $field->getType() ):
	    case shField::COLOR: ?>class="color"<?php break;
	    case shField::DATE: ?>class="date"<?php break;
	    endswitch; ?> name="<?php echo $field->getName()?>" value="<?php echo htmlspecialchars($field->getValue()) ?>" id="<?php echo escapeString($formulaire->getName())?>_<?php echo $field->getName() ?>" />
        <?php break;

    case shField::TEXTAREA: ?>
        <textarea name="<?php echo $field->getName()?>" id="<?php echo escapeString($formulaire->getName())?>_<?php echo $field->getName() ?>"><?php echo htmlspecialchars($field->getValue()) ?></textarea>
        <?php break;

    case shField::SELECT: ?>
        <select name="<?php echo $field->getName() ?>" id="<?php echo escapeString($formulaire->getName())?>_<?php echo $field->getName() ?>">
        <?php foreach($field->getOptions() AS $optionName=>$optionValue): ?>
        <option value="<?php echo $optionName ?>" <?php if ($field->getValue() == $optionName):?>selected="selected"<?php endif; ?>><?php echo htmlspecialchars($optionValue) ?></option>
        <?php endforeach; ?>
        </select>
        <?php break;

    case shField::MULTIBOX: ?>
        <select class="multiple" name="<?php echo $field->getName() ?>[]" id="<?php echo escapeString($formulaire->getName())?>_<?php echo $field->getName() ?>" multiple="true">
        <?php foreach($field->getOptions() AS $optionName=>$optionValue): ?>
        <option value="<?php echo $optionName ?>" <?php if (in_array($optionName, $field->getValue())):?>selected="selected"<?php endif; ?>><?php echo htmlspecialchars($optionValue) ?></option>
        <?php endforeach; ?>
        </select>
        <?php break;

    case shField::PASSWORD: ?>
        <input type="password" name="<?php echo $field->getName()?>" value="<?php echo htmlspecialchars($field->getValue()) ?>" id="<?php echo escapeString($formulaire->getName())?>_<?php echo $field->getName() ?>" />
        <?php break;

    case shField::CHECKBOX: ?>
        <input type="checkbox" class="checkbox" name="<?php echo $field->getName()?>" id="<?php echo escapeString($formulaire->getName())?>_<?php echo $field->getName() ?>" <?php if ( $field->isValue() ): ?>checked="checked"<?php endif; ?>/>
        <?php break;

    case shField::RESET: ?>
        <input type="reset" name="<?php echo $field->getName() ?>" value="<?php echo $field->getLabel() ?>" />
        <?php break;

    case shField::LINK: ?>
        <a href="<?php echo $field->getValue() ?>"><?php echo $field->getLabel() ?></a>
        <?php break;

    case shField::STRING: ?>
        <span><?php echo $field->getValue() ?></span><input type="hidden" name="<?php echo $field->getName() ?>" value="<?php echo $field->getValue() ?>" />
	<?php break;
	
    default: ?>
    <?php break;    
endswitch; ?>